function haha(){
    let cur_time = new Date().getDate();
    console.log('The current time is : ' + cur_time);
    setTimeout(haha, 2000);
    console.log('The setTimeout started.');
}

setTimeout(haha, 2000);